package com.taxigang.client.ui.map;

import com.google.gwt.event.dom.client.HasAllFocusHandlers;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.dom.client.HasKeyPressHandlers;
import com.google.gwt.event.logical.shared.HasSelectionHandlers;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
import com.taxigang.client.ui.ButtonType;
import com.taxigang.client.ui.Navigatable;
import com.taxigang.client.ui.map.MapView.ButtonMode;
import com.taxigang.client.ui.map.MapView.TextBoxType;

public 	interface SearchView extends Navigatable {
	enum SearchDisplayMode{ START, DESTINATION, TIME, SEARCH_CREATE };
	
	HasText getTextBoxText(MapView.TextBoxType tbt);


	HasKeyPressHandlers getTextBox(MapView.TextBoxType tbt);
	SuggestBox getSuggestBox(MapView.TextBoxType tbt);
	HasSelectionHandlers<Suggestion> getSuggestion(MapView.TextBoxType tbt);

	HasClickHandlers getButton(ButtonType buttonType);
	HasAllFocusHandlers getFocus(TextBoxType tbt);
	HasClickHandlers getOKTimeButton();

	void updateDepartureTime();
	void setMode(SearchDisplayMode mode);
	void setStart(String start);
	void setDestination(String destination);

	void show();


	void setTextBoxText(TextBoxType tbt, String text);


	void setButtonMode(ButtonMode mode);

}


